.class public Lrexsee/core/widget/Tab;
.super Lrexsee/core/widget/LabelDiv;
.source "Tab.java"


# instance fields
.field public downRunnable:Ljava/lang/Runnable;

.field public extraRunnable:Ljava/lang/Runnable;

.field public final styleNormal:Lrexsee/core/style/StyleSheet;

.field public final stylePressed:Lrexsee/core/style/StyleSheet;

.field public final styleSelected:Lrexsee/core/style/StyleSheet;

.field public upRunnable:Ljava/lang/Runnable;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lrexsee/core/menu/PopMenuItem;)V
    .locals 4
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "item"    # Lrexsee/core/menu/PopMenuItem;

    .prologue
    const/4 v3, 0x1

    .line 22
    invoke-direct {p0, p1}, Lrexsee/core/widget/LabelDiv;-><init>(Landroid/content/Context;)V

    .line 19
    const/4 v1, 0x0

    iput-object v1, p0, Lrexsee/core/widget/Tab;->extraRunnable:Ljava/lang/Runnable;

    .line 23
    iget-object v1, p2, Lrexsee/core/menu/PopMenuItem;->styleNormal:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v1}, Lrexsee/core/style/StyleSheet;->clone()Lrexsee/core/style/StyleSheet;

    move-result-object v1

    iput-object v1, p0, Lrexsee/core/widget/Tab;->styleNormal:Lrexsee/core/style/StyleSheet;

    .line 24
    iget-object v1, p2, Lrexsee/core/menu/PopMenuItem;->stylePressed:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v1}, Lrexsee/core/style/StyleSheet;->clone()Lrexsee/core/style/StyleSheet;

    move-result-object v1

    iput-object v1, p0, Lrexsee/core/widget/Tab;->stylePressed:Lrexsee/core/style/StyleSheet;

    .line 25
    iget-object v1, p2, Lrexsee/core/menu/PopMenuItem;->styleSelected:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v1}, Lrexsee/core/style/StyleSheet;->clone()Lrexsee/core/style/StyleSheet;

    move-result-object v1

    iput-object v1, p0, Lrexsee/core/widget/Tab;->styleSelected:Lrexsee/core/style/StyleSheet;

    .line 27
    :try_start_0
    iget-object v1, p2, Lrexsee/core/menu/PopMenuItem;->downRunnable:Ljava/lang/Runnable;

    iput-object v1, p0, Lrexsee/core/widget/Tab;->downRunnable:Ljava/lang/Runnable;

    .line 28
    iget-object v1, p2, Lrexsee/core/menu/PopMenuItem;->upRunnable:Ljava/lang/Runnable;

    iput-object v1, p0, Lrexsee/core/widget/Tab;->upRunnable:Ljava/lang/Runnable;

    .line 29
    iget-object v1, p2, Lrexsee/core/menu/PopMenuItem;->id:Ljava/lang/String;

    invoke-virtual {p0, v1}, Lrexsee/core/widget/Tab;->setDivId(Ljava/lang/String;)V

    .line 30
    const/4 v1, 0x1

    invoke-virtual {p0, v1}, Lrexsee/core/widget/Tab;->setClickable(Z)V

    .line 31
    new-instance v1, Lrexsee/core/widget/Tab$1;

    invoke-direct {v1, p0}, Lrexsee/core/widget/Tab$1;-><init>(Lrexsee/core/widget/Tab;)V

    invoke-virtual {p0, v1}, Lrexsee/core/widget/Tab;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    .line 61
    const/4 v1, 0x0

    invoke-virtual {p0, v1}, Lrexsee/core/widget/Tab;->setSelected(Z)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 65
    :goto_0
    return-void

    .line 62
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 63
    .local v0, "e":Ljava/lang/Exception;
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "TabBar:"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {p1, v1, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v1

    invoke-virtual {v1}, Landroid/widget/Toast;->show()V

    goto :goto_0
.end method


# virtual methods
.method public isSelected()Z
    .locals 2

    .prologue
    .line 89
    iget-object v0, p0, Lrexsee/core/widget/Tab;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v1, p0, Lrexsee/core/widget/Tab;->styleSelected:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public setSelected(Z)V
    .locals 1
    .param p1, "selected"    # Z

    .prologue
    .line 84
    if-eqz p1, :cond_0

    iget-object v0, p0, Lrexsee/core/widget/Tab;->styleSelected:Lrexsee/core/style/StyleSheet;

    :goto_0
    iput-object v0, p0, Lrexsee/core/widget/Tab;->styleSheet:Lrexsee/core/style/StyleSheet;

    .line 85
    invoke-virtual {p0}, Lrexsee/core/widget/Tab;->setLabelStyle()V

    .line 86
    return-void

    .line 84
    :cond_0
    iget-object v0, p0, Lrexsee/core/widget/Tab;->styleNormal:Lrexsee/core/style/StyleSheet;

    goto :goto_0
.end method

.method public setStyle(Ljava/lang/String;)V
    .locals 1
    .param p1, "style"    # Ljava/lang/String;

    .prologue
    .line 69
    iget-object v0, p0, Lrexsee/core/widget/Tab;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v0, p1}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    .line 70
    invoke-virtual {p0}, Lrexsee/core/widget/Tab;->setLabelStyle()V

    .line 71
    iget-object v0, p0, Lrexsee/core/widget/Tab;->styleNormal:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v0, p1}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    .line 72
    iget-object v0, p0, Lrexsee/core/widget/Tab;->stylePressed:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v0, p1}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    .line 73
    iget-object v0, p0, Lrexsee/core/widget/Tab;->styleSelected:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v0, p1}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    .line 74
    return-void
.end method

.method public setStyle(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 2
    .param p1, "normalStyle"    # Ljava/lang/String;
    .param p2, "pressedStyle"    # Ljava/lang/String;
    .param p3, "selectedStyle"    # Ljava/lang/String;

    .prologue
    .line 76
    iget-object v0, p0, Lrexsee/core/widget/Tab;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {p0}, Lrexsee/core/widget/Tab;->isSelected()Z

    move-result v1

    if-eqz v1, :cond_0

    move-object v1, p3

    :goto_0
    invoke-virtual {v0, v1}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    .line 77
    invoke-virtual {p0}, Lrexsee/core/widget/Tab;->setLabelStyle()V

    .line 78
    iget-object v0, p0, Lrexsee/core/widget/Tab;->styleNormal:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v0, p1}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    .line 79
    iget-object v0, p0, Lrexsee/core/widget/Tab;->stylePressed:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v0, p1}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    move-result-object v0

    invoke-virtual {v0, p2}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    .line 80
    iget-object v0, p0, Lrexsee/core/widget/Tab;->styleSelected:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v0, p1}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    move-result-object v0

    invoke-virtual {v0, p3}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    .line 81
    return-void

    :cond_0
    move-object v1, p1

    .line 76
    goto :goto_0
.end method
